<?php
/*
 * (C) Copyright 2013 Torsten Gorath (http://www.blauesdach.de/).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Contributors:
 *     Torsten Gorath
 */
require_once $basedir . "/inc/role.php";
require_once $basedir . "/inc/privilegedUser.php";

$roles = Role::getAll();
?>
<div id='user_form_block'>
    <form id='user_form'>
        <div>
            <div class='inline-block label'>Vorname:</div>
            <div class='inline-block'>
                <input type='text' value='' name='vorname' />
            </div>
        </div>
        <div>
            <div class='inline-block label'>Nachname:</div>
            <div class='inline-block'>
                <input type='text' value='' name='nachname' />
            </div>
        </div>
        <div>
            <div class='inline-block label'>EMail:</div>
            <div class='inline-block'>
                <input type='email' value='' name='email' />
            </div>
        </div>
        <div>
            <div class='inline-block label'>Password:</div>
            <div class='inline-block'>
                <input type='password' value='' name='password' />
            </div>
        </div>
        <div>
            <div class='inline-block label'>Wiederholen:</div>
            <div class='inline-block'>
                <input type='password' value='' name='password2' />
            </div>
        </div>
        <div id='roles'>
            <input type='button' name='add_role' value='Rolle Hinzuf&uuml;gen' />
        </div>
        <div id='add_role'>
            <select>
<?php
for($i=0; $i<count($roles); $i++) {
    echo "<option value='".$roles['id']."'>".$roles['name']."</option>";
}
?>
            </select><br />
            <input type='submit' name='save_role' value='Hinzuf&uuml;gen' />
            <input type='button' name='abord_role' value='Abbrechen' />
        </div>
        <div>
            <input type='submit' name='save' value='Speichern' />
            <input type='button' name='abord' value='Abbrechen' />
        </div>
    </form>
</div>
<?php

?>